package no.hib.bridge.beans;

import org.json.JSONException;
import org.json.JSONObject;

public class BoardInfoBean {
	public String fileName;
	String round;
	String table;
	String section;
	int sectionNr;
	String north;
	String south;
	String east;
	String west;
	int highBoard;
	int lowBoard;
	
	public int getHighBoard() {
		return highBoard;
	}
	public void setHighBoard(int highBoard) {
		this.highBoard = highBoard;
	}
	public int getLowBoard() {
		return lowBoard;
	}
	public void setLowBoard(int lowBoard) {
		this.lowBoard = lowBoard;
	}
	public String getRound() {
		return round;
	}
	public void setRound(String round) {
		this.round = round;
	}
	public String getTable() {
		return table;
	}
	public void setTable(String table) {
		this.table = table;
	}
	public String getSection() {
		return section;
	}
	public void setSection(String section) {
		this.section = section;
	}
	public String getNorth() {
		return north;
	}
	public void setNorth(String north) {
		this.north = north;
	}
	public String getSouth() {
		return south;
	}
	public void setSouth(String south) {
		this.south = south;
	}
	public String getEast() {
		return east;
	}
	public void setEast(String east) {
		this.east = east;
	}
	public String getWest() {
		return west;
	}
	public void setWest(String west) {
		this.west = west;
	}
	public void fillWithJSON(JSONObject jSON) throws JSONException {

		this.round=jSON.getString("round");
		this.table=jSON.getString("table");
		this.section=jSON.getString("section");
		JSONObject pi = jSON.getJSONObject("pi"); 
		this.north=pi.getString("north");
		this.south=pi.getString("south");
		this.east=pi.getString("east");
		this.west=pi.getString("west");
	}
	public void setSectionNr(int sectionID) {
		sectionNr=sectionID;
	}
	public int getSectionNr() {
		return sectionNr;
	}
}
